package com.erlang4j.internal.adapters;


import com.erlang4j.api.IGetData;
import com.erlang4j.api.adapters.MessageAdapter;
import com.erlang4j.api.process.IProcessWithState;

public class MockAddBindingAdapter extends MessageAdapter {

	public int count;
	private final String key;
	private final String object;
	public IGetData context;

	public MockAddBindingAdapter(String pattern, String key, String object) {
		super(pattern);
		this.key = key;
		this.object = object;
	}

	@Override
	public void process(IProcessWithState process, IGetData data) throws Exception {
		this.context = data;
		count++;
		process.bind(key, object);
	}

}